package com.ruoyi.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;


import java.util.Date;

/*审批记录的实体类*/
@TableName("erp_audit_record")
public class ApprovalRecord {

        @TableId(  type = IdType.AUTO)
        private int id;                // 审核记录ID
        private int businessId;      // 业务ID
        private String businessType;    // 业务类型
        @TableField(value = "approval_node")
        private String approvalNode;   // 审批节点
        @TableField(fill = FieldFill.INSERT)
        private String approver;        // 审批人
        private String approvalTime;      // 审批时间
        @TableField(value = "audit_result")
        private Integer result;         // 审批结果(0-拒绝，1-同意，2-退回，3-转审)
        private String opinion;// 审批意见
        private String previousApprover;// 上一级审批人
        private String nextApprover;    // 下一级审批人

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
        private Date createTime;        // 创建时间
        @TableField(fill = FieldFill.INSERT)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date updateTime;        // 更新时间
        @TableLogic
        private Integer deleted;        // 逻辑删除(0-未删除，1-已删除)
        private String processStatus;   // 流程状态(PENDING-待处理，PROCESSING-处理中，COMPLETED-已完成)
    @TableField("ji_id")
       private int jiId;
        // 显式定义两种setter方法


    public int getJiId() {
        return jiId;
    }

    public void setJiId(int jiId) {
        this.jiId = jiId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getBusinessId() {
        return businessId;
    }

    public void setBusinessId(int businessId) {
        this.businessId = businessId;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getApprovalNode() {
        return approvalNode;
    }

    public void setApprovalNode(String approvalNode) {
        this.approvalNode = approvalNode;
    }

    public String getApprover() {
        return approver;
    }

    public void setApprover(String approver) {
        this.approver = approver;
    }

    public String getApprovalTime() {
        return approvalTime;
    }

    public void setApprovalTime(String approvalTime) {
        this.approvalTime = approvalTime;
    }

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    public String getOpinion() {
        return opinion;
    }

    public void setOpinion(String opinion) {
        this.opinion = opinion;
    }

    public String getPreviousApprover() {
        return previousApprover;
    }

    public void setPreviousApprover(String previousApprover) {
        this.previousApprover = previousApprover;
    }

    public String getNextApprover() {
        return nextApprover;
    }

    public void setNextApprover(String nextApprover) {
        this.nextApprover = nextApprover;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public String getProcessStatus() {
        return processStatus;
    }

    public void setProcessStatus(String processStatus) {
        this.processStatus = processStatus;
    }

    @Override
    public String toString() {
        return "ApprovalRecord{" +
                "id=" + id +
                ", businessId=" + businessId +
                ", businessType='" + businessType + '\'' +
                ", approvalNode='" + approvalNode + '\'' +
                ", approver='" + approver + '\'' +
                ", approvalTime='" + approvalTime + '\'' +
                ", result=" + result +
                ", opinion='" + opinion + '\'' +
                ", previousApprover='" + previousApprover + '\'' +
                ", nextApprover='" + nextApprover + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", deleted=" + deleted +
                ", processStatus='" + processStatus + '\'' +
                ", jiId=" + jiId +
                '}';
    }
}

